<?php

$dbremote = false;

$srv  = $_SERVER['SERVER_NAME'];
if ($srv == "localhost") {
	/*
	$host="201.235.253.21";
	$user="custom_brl";
	$password="b2r7l3";
	$db="custom_brldb";
	*/
	
	$host="localhost";
	$user="root";
	$password="";
	$db="brldb";
	
	
}else if ($srv != "localhost"){
	/*
	$host="localhost";
	$user="root";
	$password="";
	$db="brldb";
	*/
};

$Link =  mysql_connect($host, $user, $password);
$Db  = mysql_select_db($db) ;	
		
	
		
if ( !$Link ){
	throw new Exception("Could not connect to host :\n".mysql_error() );	
	mysql_close($Link);

}else{

		if ( !$Db ){
		throw new Exception("Could not connect to database :\n".mysql_error() );	
	//	mysql_close($Link);
		}

}
?>